<template>
	<view class="content" style="flex-direction: column;">
		<u-line color="#2979ff" style='padding-top: 10px;padding-bottom: 10px;'></u-line>
		    <u-tabs :list="list" @click="click"></u-tabs>

		<button type="primary" style="width: 100%;" @click="firstButtonAction">Flxe布局</button>
		<button type="primary" style="width: 100%;" @click="secondButtonAction">常规组件</button>
		<button type="primary" style="width: 100%;" @click="thirdButtonAction">数据绑定</button>
		<button type="primary" style="width: 100%;" @click="fourButtonAction">网络请求</button>
		<button type="primary" style="width: 100%;" @click="fiveButtonAction">切换tabbar</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				list:[{name:'关注'},{name:'关注1'},{name:'关注2'},{name:'关注3'}]
			}
		},
		onLoad() {

		},
		methods: {            
			click(item) {
                console.log('item', item);
            },
			firstButtonAction() {
				var app = getApp();
				console.log(app.globalData.url);
				uni.navigateTo({
					url: 'flex'
				})
			},
			secondButtonAction() {
				uni.navigateTo({
					url: 'common_module'
				})
			},
			thirdButtonAction() {
				uni.navigateTo({
					url: 'data_bind'
				})
			},
			fourButtonAction() {
				uni.switchTab({
					url: 'network_request'
				})
			},
			fiveButtonAction(){
				uni.switchTab({
					url: 'MineCenter'
				})
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
